package com.itheima.server.controller;

import com.itheima.domain.UserInfo;
import com.itheima.server.service.HuanXinService;
import com.itheima.vo.HuanXinUserVo;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/huanxin")
public class HuanXinController {


    @Resource
    private HuanXinService huanXinService;


    /**
     * 获取环信账户信息
     * @return
     */
    @GetMapping("/user")
    public ResponseEntity<HuanXinUserVo> hxUser(){
        HuanXinUserVo vo = huanXinService.getHxUser();
        return ResponseEntity.ok(vo);
    }




}
